package com.duan.SpringbootMybatis.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.duan.SpringbootMybatis.domain.User;
import com.duan.SpringbootMybatis.mapper.UserMapper;
import com.duan.SpringbootMybatis.service.UserService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;

@Service
public class UserServiceImpl implements UserService {

	
	@Autowired
	UserMapper userMapper;
	
	public List<User> queryUserInfo(User user) {
		return this.userMapper.queryUserInfo(user);
	}
	/**
	 * 分页查询
	 */
	public Page<User> queryUserPage(User user, int pageNo, int pageSize) {
		PageHelper.startPage(pageNo, pageSize);
		return this.userMapper.queryUserPage(user);
	}

}
